{% extends "admin/base_site.html" %}
{% load adminmedia i18n %}

{% block extrahead %}
{{ media }}
<script type="text/javascript">
    var listBtn = new YAHOO.widget.Button({
        type: "link",
        href: "../",
        label: '{% trans  "Done" %}', 
        container: "tolisting"
  });
</script> 
{% endblock %}

{% block stylesheet %}{% admin_media_prefix %}css/reorder.css{% endblock %}

{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} reorder{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="../../../">{% trans "Home" %}</a> &rsaquo;
    <a href="../../../{{ section_id }}/">{{ section_name|capfirst }}</a> &rsaquo;
    <a href="../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
    {% blocktrans with opts.verbose_name_plural as name %}Reorder {{ name }}{% endblocktrans %}
    </div>
{% endblock %}

{% block coltype %}flex{% endblock %}

{% block content %}<div id="content-main">
{% block object-tools %}
<ul class="object-tools">
  <li><a href="../" class="reorderlink">{% blocktrans with opts.verbose_name_plural|capfirst as name %}{{ name }} listing{% endblocktrans %}</a></li>
</ul>
{% endblock %}

<div class="module" id="reorder">

{% block result_list %}
{% for section in sections %}
  <h2>{{ section.name }}</h2>
  <ul class="reorderlist" id="reorderlist_{{ section.key }}">
  {% for object in section.object_list %}
    <li id="object_{{ object.pk }}">{{ object }}</li>
  {% endfor %}
  </ul>
{% endfor %}
{% endblock %}

<div id="tolisting"></div>
</div>
</div>
{% endblock %}
